So I have had a hard time finding information on handling section locks through DXL. I currently have a few modules setup for shareable edit, but I have a trigger that needs access to other modules to create links (I can't do it from the current module otherwise users will delete things and bad things happen). However, multiple people can be in a module at a given time, its also possible someone accidentally has the module open in exclusive edit.
for blnk in obj1<-sLinkMod do {
obj2=source(blnk)
mess=lock(obj2)
if(null mess) {delete blnk}
}
flushDeletions
unlockSaveAll(meta)
for obj in blCOTS do {
if (obj.\"Absolute Number\"\"\" == reqID){
blProdFound = true
for alnk in obj->sblmetaLink do {
obj2=target(alnk)
string mess=lock(obj2)
if(!null(obj2)&&(null mess)) {
blnk=obj1<-sLinkMod<-obj2
unlockSaveSection(obj2)
}
else {
errorBox(\"The required section in the Module is already locked by another user.\\nContact Administrator.\")}
}
break
}
}
SystemAdmin - Thu Sep 08 14:20:37 EDT 2011 |